package com.shiguiwu.springmybatis.mybatis;

import com.shiguiwu.springmybatis.mybatis.mapper.BookMapper;
import org.apache.ibatis.session.SqlSession;

/**
 * @description: 二级缓存
 * @author: stone
 * @date: Created by 2021/7/2 9:33
 * @version: 1.0.0
 * @pakeage: com.shiguiwu.springmybatis.mybatis
 */
public class CachePlusMybatisTests {

    public static void main(String[] args) {
        SqlSession sqlSession = MapperTests.FACTORY.openSession(true);
        BookMapper bookMapper = sqlSession.getMapper(BookMapper.class);


        SqlSession sqlSession1 = MapperTests.FACTORY.openSession(true);
        BookMapper bookMapper1 = sqlSession1.getMapper(BookMapper.class);



        SqlSession sqlSession2 = MapperTests.FACTORY.openSession(true);
        BookMapper bookMapper2 = sqlSession2.getMapper(BookMapper.class);

        bookMapper.getBookListPlus();
        bookMapper1.getBookListPlus();
        bookMapper2.getBookListPlus();

    }
}
